package db;

// Generated 12.06.2012 19:50:00 by Hibernate Tools 3.4.0.CR1

import java.math.BigDecimal;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.Generated;
import org.hibernate.annotations.GenerationTime;

/**
 * ItemAttribute generated by hbm2java
 */
@Entity
@Table(name = "item_attribute")
public class ItemAttribute implements java.io.Serializable {

	private long itemAttribute;
	private ItemAttributeType itemAttributeType;
	private Item item;
	private String typeName;
	private String valueText;
	private BigDecimal valueNumber;
	private Date valueDate;
	private Long dataType;
	private Long orderby;

	public ItemAttribute() {
	}

	public ItemAttribute(long itemAttribute) {
		this.itemAttribute = itemAttribute;
	}

	public ItemAttribute(long itemAttribute,
			ItemAttributeType itemAttributeType, Item item, String typeName,
			String valueText, BigDecimal valueNumber, Date valueDate,
			Long dataType, Long orderby) {
		this.itemAttribute = itemAttribute;
		this.itemAttributeType = itemAttributeType;
		this.item = item;
		this.typeName = typeName;
		this.valueText = valueText;
		this.valueNumber = valueNumber;
		this.valueDate = valueDate;
		this.dataType = dataType;
		this.orderby = orderby;
	}

	@Id
	@Generated(GenerationTime.NEVER)
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name = "item_attribute", unique = true, nullable = false, precision = 10, scale = 0)
	public long getItemAttribute() {
		return this.itemAttribute;
	}

	public void setItemAttribute(long itemAttribute) {
		this.itemAttribute = itemAttribute;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "item_attribute_type_fk")
	public ItemAttributeType getItemAttributeType() {
		return this.itemAttributeType;
	}

	public void setItemAttributeType(ItemAttributeType itemAttributeType) {
		this.itemAttributeType = itemAttributeType;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "item_fk")
	public Item getItem() {
		return this.item;
	}

	public void setItem(Item item) {
		this.item = item;
	}

	@Column(name = "type_name", length = 200)
	public String getTypeName() {
		return this.typeName;
	}

	public void setTypeName(String typeName) {
		this.typeName = typeName;
	}

	@Column(name = "value_text")
	public String getValueText() {
		return this.valueText;
	}

	public void setValueText(String valueText) {
		this.valueText = valueText;
	}

	@Column(name = "value_number", precision = 131089, scale = 0)
	public BigDecimal getValueNumber() {
		return this.valueNumber;
	}

	public void setValueNumber(BigDecimal valueNumber) {
		this.valueNumber = valueNumber;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "value_date", length = 13)
	public Date getValueDate() {
		return this.valueDate;
	}

	public void setValueDate(Date valueDate) {
		this.valueDate = valueDate;
	}

	@Column(name = "data_type", precision = 10, scale = 0)
	public Long getDataType() {
		return this.dataType;
	}

	public void setDataType(Long dataType) {
		this.dataType = dataType;
	}

	@Column(name = "orderby", precision = 10, scale = 0)
	public Long getOrderby() {
		return this.orderby;
	}

	public void setOrderby(Long orderby) {
		this.orderby = orderby;
	}

}
